package com.info.zhiduoduo.repository.mapper.customer;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.info.zhiduoduo.repository.dto.customer.ServiceErrorDto;
import com.info.zhiduoduo.repository.entity.customer.ServiceError;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *<P></P>
 *
 * @Author wang
 * @date 2021/4/7
 **/
public interface ServiceErrorMapper extends BaseMapper<ServiceError> {

   @Select("select err.id,err.createtime,m.managername createManagername,err.content,err.involve_department,\n" +
           " err.involve_person,ma.managername followManagername,err.follow_person as followPerson,man.managername solveManagername,err.solve_person as solvePerson,err.wheather_solve,\n" +
           " err.happen_time,err.solve_time,err.submit,err.next_follow_time\n" +
           " from zdd_service_error err\n" +
           " left join zdd_system_manager m on err.create_person=m.managerid\n" +
           " left join zdd_system_manager ma on err.follow_person=ma.managerid\n" +
           " left join zdd_system_manager man on err.solve_person=man.managerid "+
           " where ${str}\n"+
           " order by err.id desc ")
     List<ServiceErrorDto> queryServiceError(@Param("str") String str) ;



}
